#============================================================
#	Room Test
#============================================================
# @datetime: 2022-3-18 19:47:06
#============================================================
extends Node2D


# 砖块
var bricks : Dictionary
# 木桥
var bridge : Dictionary
# 可踩踏地板
var floors : Dictionary

var _draw_points : Array = []
var _draw_block_points : Array = []

onready var _platform_path_point = $PlatformPathPoint
onready var _draw_circle_point = $DrawCirclePoint


#============================================================
#   内置
#============================================================
func _ready():
	scan_map()
	
#	_draw_circle_point.draw_by_points(floors.keys())
	
	_platform_path_point.scan(floors.keys())
#	_draw_circle_point.draw_by_point_group(_platform_path_point.get_external_point_group())


#============================================================
#   自定义
#============================================================
##  扫描地图
func scan_map():
	var map = MapData.get_map()
	
	var temp : Array
	
	temp = map.get_used_cells_by_id(Rooms.TileType.Brick)
	for pos in temp:
		bricks[pos] = null
		floors[pos] = null
	
	# 记录这个
	temp = map.get_used_cells_by_id(Rooms.TileType.Bridge)
	for pos in temp:
		bridge[pos] = null
		floors[pos] = null
	Logger.error(self, [bridge])

